<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery-3.7.1.min.js"></script>
    <!-- <style>
        div{
            color: red;
        }
    </style> -->
</head>
<body>
    <!-- <div>我是一个div</div>
    <script>
        let divColor = $("div").css("color");
        console.log(divColor);
        $("div").css("color", "green");
        let divColor2 = $("div").css("color");
        console.log(divColor2);
    </script> -->
    <!-- <ul>
        <li>111</li>
        <li>222</li>
        <li>333</li>
        <li>444</li>
    </ul>
    <script>
        $("ul").append("append被选元素的结尾");
        $("ul").prepend("prepend被选元素的开头");
        $("ul").after("被选元素的后面");
        $("ul").before("被选元素的前面");
    </script> -->
    <div>我是一个div</div>
    <button>点击消除</button>
    <script>
        $("button").click(function(){
            $("div").remove();//连同div一起消除
            // $("div").empty();//不消除div
        });
    </script>
</body>
</html>